fix(amf): enable H.264 profile and coder selection#4927
Open
k4idyn wants to merge 3 commits intoLizardByte:masterfrom
Open
fix(amf): enable H.264 profile and coder selection#4927k4idyn wants to merge 3 commits intoLizardByte:masterfrom
k4idyn wants to merge 3 commits intoLizardByte:masterfrom
Conversation
|
Member
|
Thank you for the PR submission, but I noticed you didn't use our PR template. Please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1 |
ReenigneArcher
requested changes
Mar 30, 2026
Member
There was a problem hiding this comment.
You don't like our ci-windows.yml workflow?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Currently, the AMD AMF encoder (
h264_amf) insrc/video.cppdoes not have theprofileandcoderoptions wired up in itsencoder_tdefinition. This prevents clients that strictly require H.264 Baseline/CAVLC (like the Sony PSP or other legacy hardware decoders) from successfully streaming, as the encoder defaults to High Profile and CABAC regardless of the client's request or the global configuration.Why this is needed
Older hardware decoders often have hardwired limitations. For example, the PSP-1000's Media Engine only supports:
While Sunshine/Apollo allows selecting
cavlcin the UI, this setting is ignored by theh264_amfencoder because it isn't passed to the FFmpegavcodec_open2dictionary.Proposed Fix
Update the
amdvcedefinition insrc/video.cppto include the missing options:{"coder"s, &config::video.amd.amd_coder}, {"profile"s, [](const config_t &cfg) { if (cfg.profile == 66) return "baseline"s; if (cfg.profile == 77) return "main"s; return "high"s; }},This brings the AMD implementation into parity with NVENC and QuickSync.